import by.zmy.Subscribe;

public class NotificationService {
    @Subscribe
    public void handleOrderCreated(Order order) {
        System.out.println(Thread.currentThread().getId()+"[同步] 发送订单确认邮件" );
    }

    @Subscribe(async = true)
    public void handleUserRegistered(Order order) {
        System.out.println(Thread.currentThread().getId()+"[异步] 发送欢迎邮件 ");
    }
}
